//
//  ClassCollectionViewCell.m
//  MyItem
//
//  Created by SoulWater on 15/12/26.
//  Copyright © 2015年 admin. All rights reserved.
//

#import "ClassCollectionViewCell.h"
#import "wareModel.h"
@implementation ClassCollectionViewCell

- (void)awakeFromNib {
    
    [self setNeedsLayout];
}


-(void)setWareModel:(wareModel *)wareModel
{
    if (_wareModel != wareModel)
    {
        _wareModel = wareModel;
        
        
        [self setNeedsLayout];
    }
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
//    NSLog(@"%@",_wareModel);
    NSString *urlStr = _wareModel.icon;
    NSString *newStr = [urlStr substringToIndex:urlStr.length-5];

    [_iconImgView sd_setImageWithURL:[NSURL URLWithString:newStr]];
    
    _nameLabel.text = _wareModel.name;
    
}

@end
